<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "site_data".
 *
 * @property integer $id
 * @property string $name
 * @property string $qq
 * @property string $phone
 * @property string $goods_name
 * @property string $goods_address
 * @property integer $status
 * @property string $create_at
 */
class SiteData extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'site_data';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name','goods_name'], 'required'],
            [['status'], 'integer'],
            [['create_at'], 'safe'],
            [['name', 'goods_name'], 'string', 'max' => 50],
            [['qq', 'phone'], 'string', 'max' => 20],
            [['goods_address'], 'string', 'max' => 300],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'name' => Yii::t('app', '联系人'),
            'qq' => Yii::t('app', 'QQ'),
            'phone' => Yii::t('app', '手机号'),
            'goods_name' => Yii::t('app', '商品名称'),
            'goods_address' => Yii::t('app', '商品网址'),
            'status' => Yii::t('app', '状态：0：未处理 ，1：跟进中，2：已处理 '),
            'create_at' => Yii::t('app', '创建时间'),
        ];
    }
}
